import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.List;

/**
 * Created by hadoop on 2016/2/26.
 */
public class Main {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String context="绀句細鍖栧垎浜\uE0A2唴";
        convert(context);
    }

    public static void convert(String content) throws UnsupportedEncodingException {
        String[] fromEncodingArray=new String[]{"iso8859-1","gbk","gb2312"};
        String toEncoding="utf-8";
        List<String> fromEncodingList = Arrays.asList(fromEncodingArray);
        for (int i = 0; i < fromEncodingList.size(); i++) {
            System.out.println(convert(fromEncodingList.get(i)+"="+content,fromEncodingList.get(i),toEncoding));
        }
    }

    public static String convert(String content,String fromEncoding,String toEncoding) throws UnsupportedEncodingException {
        return new String(content.getBytes(fromEncoding), toEncoding);
    }

}
